package com.yunji.aggregate.model.dto.analysis;

import com.yunji.common.base.PageDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
/**
 * @author : peter-zhu
 * @date : 2024/12/24 09:47
 * @description : TODO
 **/
@Data
public class ScanStatisticsParam extends StatisticsCommonParam {
    @ApiModelProperty(value = "扫描用户名")
    private String scanUserName;
    @ApiModelProperty(value = "货柜名称")
    private String containerName;
    @ApiModelProperty(value = "代理商名称")
    private String agentName;
    @ApiModelProperty(value = "网点名称")
    private String siteName;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "时间开始")
    private LocalDate scanTimeS;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "时间结束")
    private LocalDate scanTimeE;
    @ApiModelProperty("扫描手机号")
    private String scanPhone;
//    @ApiModelProperty(value = "1 日   2 月")
//    private Integer timeScopeType = 1;
//
//    public String getSqlDateFormat() {
//        if (timeScopeType == 2) {
//            return "%Y-%m";
//        }
//        return "%Y-%m-%d";
//    }

    public LocalDate getScanTimeE() {
        if (scanTimeE != null)
            return scanTimeE.plusDays(1);
        return null;
    }
}
